package com.skeleton.db.dto;

import com.skeleton.common.base.dto.BaseDto;
import com.skeleton.db.entity.Userinfo;
import com.skeleton.utils.MD5Utils;

public class UserinfoDto extends BaseDto {

	private String userLoginname;
	private String userNickname;
	private String userPassword;
	private int userRegistDttm;
	private String userRegistDttmStr;
	private String userRegistIp;
	private char userStatus;
	private int userLevel;
	
	public Userinfo toEntity() {
		Userinfo entity = new Userinfo();
		entity.setLoginname(userLoginname);
		entity.setNickname(userNickname);
		entity.setPassword(userPassword);
		entity.setRegist_dttm(userRegistDttm);
		entity.setRegist_ip(userRegistIp);
		entity.setStatus(userStatus);
		entity.setLevel(userLevel);
		return entity;
	}

	public int getUserRegistDttm() {
		return userRegistDttm;
	}

	public void setUserRegistDttm(int userRegistDttm) {
		this.userRegistDttm = userRegistDttm;
	}

	public String getUserRegistDttmStr() {
		return userRegistDttmStr;
	}

	public void setUserRegistDttmStr(String userRegistDttmStr) {
		this.userRegistDttmStr = userRegistDttmStr;
	}

	public String getUserRegistIp() {
		return userRegistIp;
	}

	public void setUserRegistIp(String userRegistIp) {
		this.userRegistIp = userRegistIp;
	}

	public char getUserStatus() {
		return userStatus;
	}

	public void setUserStatus(char userStatus) {
		this.userStatus = userStatus;
	}

	public int getUserLevel() {
		return userLevel;
	}

	public void setUserLevel(int userLevel) {
		this.userLevel = userLevel;
	}

	public String getUserNickname() {
		return userNickname;
	}

	public void setUserNickname(String userNickname) {
		this.userNickname = userNickname;
	}

	public String getUserLoginname() {
		return userLoginname;
	}

	public void setUserLoginname(String userLoginname) {
		this.userLoginname = userLoginname;
	}

	public String getUserPassword() {
		return userPassword;
	}

	public void setUserPassword(String userPassword) {
		this.userPassword = MD5Utils.generateForPassword(userPassword);
	}

}
